package com.fise.mwtvc.socket.bean

import android.view.KeyEvent

data class WsKeyResponse(val key: String = "", val type: String = "") {

    fun getKeyCode(): Int {
        when (key) {
            "xiping" -> {
                return KeyEvent.KEYCODE_F5
            }
            "jinyin" -> {
                return KeyEvent.KEYCODE_VOLUME_MUTE
            }
            "home" -> {
                return KeyEvent.KEYCODE_HOME
            }
            "caidan" -> {
                return KeyEvent.KEYCODE_MENU
            }
            "shang" -> {
                return KeyEvent.KEYCODE_DPAD_UP
            }
            "xia" -> {
                return KeyEvent.KEYCODE_DPAD_DOWN
            }
            "zuo" -> {
                return KeyEvent.KEYCODE_DPAD_LEFT
            }
            "you" -> {
                return KeyEvent.KEYCODE_DPAD_RIGHT
            }
            "ok" -> {
                return KeyEvent.KEYCODE_DPAD_CENTER
            }
            "fanhui" -> {
                return KeyEvent.KEYCODE_BACK
            }
            "shezhi" -> {
                return KeyEvent.KEYCODE_SETTINGS
            }
            "jia" -> {
                return KeyEvent.KEYCODE_VOLUME_UP
            }
            "jian" -> {
                return KeyEvent.KEYCODE_VOLUME_DOWN
            }
            "guanji" -> {
                return 404
            }
        }
        return -99
    }

}